The present invention relates to a semiconductor device having therein a CPU and a peripheral circuit that is accessed by the CPU. This invention also relates to a computer-readable recording medium in which is recorded a computer program that, when executed, changes the number of wait cycles for an access to a peripheral circuit by a CPU.
In recent years, mobile computers have become widespread. The performance of a semiconductor device including a CPU used in such computers is also increasing. Accordingly, a technique of saving power of such a semiconductor device is demanded. In a conventional semiconductor device, power supply voltage and operation frequency were constant. Power consumption is reduced by utilizing a low power supply voltage and a low operation frequency. The CPU in such conventional semiconductor device is driven by a fixed power supply voltage at a fixed operation frequency and accesses a peripheral circuit in the semiconductor device every fixed number of wait cycles.
When there is a change in the power supply voltage or the operation frequency of a semiconductor device, or the operation frequency for a peripheral circuit, then the number of wait cycles necessary for an access process also changes. If the power supply voltage or operation frequency of the semiconductor device, or the operation frequency for a peripheral circuit changes, such as when these are changed in order to reduce power consumption, the number of wait cycles has to be fixed at a value at which access can be always made within the range of the change.
According to the conventional technique, however, the number of wait cycles for an access to the peripheral circuit in the semiconductor device by the CPU in the semiconductor device is fixed. Consequently, when the power supply voltage or operation frequency of the semiconductor device, or the operation frequency for the peripheral circuit changes, the CPU can not access the peripheral circuit. Resultantly, the semiconductor device cannot perform a proper operation. It is possible to set the number of wait cycles so that the CPU will access the peripheral circuit even if the power supply voltage or operation frequency of the semiconductor device, or operation frequency for a peripheral circuit are changed in a particular range. However, in this case, there is a drawback that the waiting time increases, and the processing capability of the semiconductor device deteriorate.
It is an object of this invention to obtain a semiconductor device that operates properly and has improved processing capability. Further, is an object of this invention to obtain a computer-readable recording medium in which a computer program which, when executed, changes the number of wait cycles of an access to a peripheral circuit by a CPU is recorded.
In the semiconductor device according to one aspect of the present invention, a holding unit that changeably holds the information of the number of wait cycles; and a control unit that performs the wait control of the access based on the information of the number of wait cycles are provided. Consequently, the number of wait cycles of the access by the CPU to the peripheral circuit can be changed.
In the semiconductor device according to another aspect of the present invention, an input connection unit that supplies a designation signal which designates the number of wait cycles of an access by the CPU to the peripheral circuit from the outside of the semiconductor device to the inside of the semiconductor device; and a control unit that performs the wait control of the access based on the designation signal supplied via the input connection unit are provided. Consequently, the number of wait cycles of the access by the CPU to the peripheral circuit can be changed.
In the semiconductor device according to still another aspect of the present invention, a testing unit that conducts a test for detecting data regarding the number of wait cycles necessary for the access; and a control unit that determines the number of wait cycles of the access by the CPU to the peripheral circuit based on a test result of the testing unit and performs the wait control of the access are provided. Consequently, the number of wait cycles of the access by the CPU to the peripheral circuit can be changed to a proper value.
In the semiconductor device according to still another aspect of the present invention, a power supply voltage detecting unit that detects a power supply voltage of the semiconductor device; and a control unit that determines the number of wait cycles of an access by the CPU to the peripheral circuit based on the detection result of the power supply voltage detecting unit and performs the wait control of the access are provided. Thus, the number of wait cycles of the access by the CPU to the peripheral circuit can be changed according to the power supply voltage of the semiconductor device.
In the semiconductor device according to still another aspect of the present invention, an operation clock detecting unit that detects a frequency of operation clock signal (operation frequency) for operating the semiconductor device; and a control unit that determines the number of wait cycles of an access by the CPU to the peripheral circuit based on a detection result of the operation clock detecting unit and performs the wait control of the access are provided. Consequently, the number of wait cycles of the access by the CPU to the peripheral circuit can be changed according to the operation frequency of the semiconductor device.
In the semiconductor device according to still another aspect of the present invention, a unit for generating an operation clock for a peripheral circuit generates an operation clock signal for a peripheral circuit to operate the peripheral circuit; and a control unit that determines the number of wait cycles of an access by the CPU to the peripheral circuit based on a frequency of the operation clock signal for the peripheral circuit generated by the unit for generating the operation clock signal for the peripheral circuit and performs a wait control of the access are provided. Consequently, the number of wait cycles of the access by the CPU to the peripheral circuit can be changed according to the operation frequency for a peripheral circuit.
A computer program which, when executed, changes the number of wait cycles of an access to a peripheral circuit by a CPU is recorded in the computer-readable recording medium according to still another aspect of the present invention. Consequently, the number of wait cycles of an access by the CPU to a peripheral circuit is changed to a proper value in accordance with the operation frequency of the semiconductor device, the power supply voltage of the semiconductor device, and/or the operation frequency for the peripheral circuit.
Other objects and features of this invention will become apparent from the following description with reference to the accompanying drawings.